<form action="{:url('Friend/adddepartment')}" class="layui-form ajax-form" method="post"
      style="margin: 20px">
    <div class="layui-form-item">
        <label class="layui-form-label">所属单位</label>
        <div class="layui-input-block">
            <select name="company_id" lay-filter="selectId">
                <option value="">请选择单位名称</option>
                {volist name="company" id="c"}
                <option value="{$c.company_id}">{$c.company_name}</option>
                {/volist}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">部门名称</label>
        <div class="layui-input-block">
            <input type="text" name="department_name" value=""
                   autocomplete="off" class="layui-input" maxlength="11" placeholder="请输入部门名称">
        </div>
    </div>
    <div class="layui-form-item" style="text-align: right">
        {:token()}
        <button class="layui-btn" lay-submit="" >确定</button>
        <button type="button" class="layui-btn layui-layer-close clearpostion layui-btn-primary">关闭</button>
    </div>
</form>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        form.render(); //更新全部
    });
</script>
